package com.cucn.common.constant.product;

/**
 * 商品服务的常量类
 *
 * @author KouChaoJie
 * @since: 2021/12/1 14:00
 */
public class ProductConstant {
    /**
     * 商品属性类型枚举
     */
    public enum AttrEnum {
        /**
         * 商品属性类型-基本属性
         */
        ATTR_TYPE_BASE(1, "base"),
        /**
         * 商品属性类型-销售属性
         */
        ATTR_TYPE_SALE(0, "sale");

        private int code;
        private String msg;

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    /**
     * 属性检索类型枚举
     */
    public enum AttrSearchValueEnum {
        /**
         * 属性检索类型-需要检索
         */
        ATTR_SEARCH_VALUE_ENUM(1, "需要检索"),
        /**
         * 属性检索类型-不不需要检索
         */
        ATTR_UNSEARCH_VALUE_ENUM(0, "不需要检索");

        private int code;
        private String msg;

        AttrSearchValueEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    /**
     * 商品上架类型枚举
     */
    public enum SpuPublishStatusEnum {
        /**
         * 新建
         */
        NEW_SPU(0, "新建"),
        /**
         * 上架
         */
        SPU_UP(1, "商品上架"),
        /**
         * 下架
         */
        SPU_DOWN(2, "商品下架");

        private int code;
        private String msg;

        SpuPublishStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
